<html>
	<head>
    	<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
  	</head>

 	<body>
 		{% if isAdmin %}
		 	<h2>Admin Panel</h2>
		 	<br>	
			<h3>Topics: </h3>
			<ul>
				{% for topic in topics %}
				<li><strong>{{ topic.content }}</strong>
					<form action="/deleteTopic" method="post">
						<input type="hidden" name="content" value="{{ topic.content }}">
						<input type="submit" value="Delete Topic">
					</form>
				</li>
		    	<form action="/editTopicAction" method="post">
					<input type="hidden" name="content" value="{{topic.content}}">
		     		<input type="submit" value="edit">
		    	</form>
				{% endfor %}
			</ul>
		{% else %}
			<h2> You are not an admin</h2>
			<b>Note:</b> To Login as an admin you have to have a google account and be added to the topicvote project as a developer.
			<br>
			<a href="{{ loginUrl }}">Click here to login</a>
		{% endif %}
	</body>
</html>
